<template>
	<div id="setting">
		<div class="set_top">
			<router-link to="/user">
				<van-icon name="arrow-left" size="0.4rem" />
			</router-link>
		</div>
		<div class="biu">
			<ul>
				<li><span>登陆密码</span>
					<van-icon name="arrow" size="0.4rem" />
				</li>
				<li><span>关于小狗</span>
					<van-icon name="arrow" size="0.4rem" />
				</li>
			</ul>
			<van-button color="#000" size="large" @click="loginOut">退出</van-button>
		</div>
	</div>
</template>

<script>
	export default {
		name: "setting",
		data() {
			return {

			}
		},
		methods:{
			loginOut(){
				localStorage.removeItem('user')
				this.$router.push("/home").catch(() =>{})
			}
		}

	}
</script>

<style>
	#setting {
		background-color: #fff;
	}

	.set_top {
		height: 0.4rem;
		padding: 0.2rem;
		border-bottom: #ddd solid 1px;
	}

	.biu {
		padding: 0.3rem;
	}

	.biu ul {
		margin: 1rem 0;
	}

	.biu li {
		display: flex;
		justify-content: space-between;
		margin: 0.4rem 0;
		font-size: 0.26rem;
		border-bottom: #ddd solid 1px;
	}
</style>
